package com.university.vo;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Attention entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "attention", catalog = "university")

public class Attention implements java.io.Serializable {

	// Fields

	private Integer attentionId;
	private Company company;
	private Student student;
	private String attentionCompanyName;
	private Timestamp attentionInputTime;

	// Constructors

	/** default constructor */
	public Attention() {
	}

	@Override
	public String toString() {
		return "Attention [attentionId=" + attentionId + ", company=" + company + ", student=" + student
				+ ", attentionCompanyName=" + attentionCompanyName + ", attentionInputTime=" + attentionInputTime + "]";
	}

	/** full constructor */
	public Attention(Company company, Student student, String attentionCompanyName, Timestamp attentionInputTime) {
		this.company = company;
		this.student = student;
		this.attentionCompanyName = attentionCompanyName;
		this.attentionInputTime = attentionInputTime;
	}

	// Property accessors
	@Id
	@GeneratedValue

	@Column(name = "attention_id", unique = true, nullable = false)

	public Integer getAttentionId() {
		return this.attentionId;
	}

	public void setAttentionId(Integer attentionId) {
		this.attentionId = attentionId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "attention_companyId")

	public Company getCompany() {
		return this.company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "attention_studentId")

	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	@Column(name = "attention_companyName", length = 50)

	public String getAttentionCompanyName() {
		return this.attentionCompanyName;
	}

	public void setAttentionCompanyName(String attentionCompanyName) {
		this.attentionCompanyName = attentionCompanyName;
	}

	@Column(name = "attention_inputTime", length = 19)

	public Timestamp getAttentionInputTime() {
		return this.attentionInputTime;
	}

	public void setAttentionInputTime(Timestamp attentionInputTime) {
		this.attentionInputTime = attentionInputTime;
	}

}